1. Field of the Invention
The invention related to data processing, and more particularly, to data transformation between relational data and XML data.
2. Description of the Related Art
Primarily queried from relational databases, business-critical data is increasingly required to be exchanged and processed as either XML data, or a combination of XML and relational data. However, using XML with relational databases has its challenges. For instance, each major database vendor provides XML extensions, but these extensions are different for each vendor and do not allow applications to be portable among databases. Some developers use XML standards (such as DOM, SAX, or StAX) in combination with database standards (such as ODBC or JDBC), but this approach requires developers to write and maintain large amounts of code.
Recognizing such challenges, the World Wide Web Consortium (W3C) developed XQuery (short term for XML Query) as a uniform language for data exchange. In the same way the SQL provides a query language for relational databases, XQuery provides a common language for accessing XML data stores and any data that can be viewed as XML (such as relational data). Thus, the amount of code developers must write and maintain to use XML and relational data together is reduced. The W3C XQuery specification and its supporting documentation are herein incorporated by reference in their entirety. As are the XML Path Language (XPath) specification and its supporting documentation. XQuery uses XPath syntax to address specific parts of an XML document.
However, there is currently no mechanism that allows application developers to retrieve relational data as XML using both a standard query language and a standard API. Rather, application developers must rely on either home-grown solutions or on a vendor-specific combination of proprietary API (or API extensions) and a standard query language, like SQL/XML or XQuery.
What is needed, therefore, are techniques that allows application developers to retrieve relational data as XML using both a standard query language and a standard API.